import { IFeidaoAiBrowserComponent } from "@feidao/web/interfaces";
import Line from "@feidao/widgets/fd-wh000006";

export default async function a001(fd: IFeidaoAiBrowserComponent, ...args: any[]) {
	const v = fd.data.node.querySelector<HTMLInputElement>('[data-feidao-id="value-id"]').value;
	if (!v) {
		alert('请输入数据');
	} else {
		const line = fd.data.node.querySelector<Line>('[data-feidao-id="fd-wh000006-001"]');
		line.setAttribute('value', v);
	}

	fd.data.node.querySelector<HTMLAreaElement>('[data-feidao-id="fd-wh000006-003"]').innerHTML = `
const v = fd.data.node.querySelector<HTMLInputElement>('[data-feidao-id="value-id"]').value;
if (!v) {
	alert('请输入数据');
} else {
	const line = fd.data.node.querySelector<Select>('[data-feidao-id="fd-wh000006-001"]');
	line.setAttribute('value', v);
}
	`;
}
